================================================================================
Replication Data and Code for: "The Impact of Dodd-Frank and the Huawei Shock on DRC Tin Exports"
Authors: Haruka Nagamori and Kazuhiko Nishimura
Date: March 2026
================================================================================

1. OVERVIEW
-----------
This replication package contains the datasets and Stata do-files required to replicate the main results, appendix results, and robustness checks for the paper "The Impact of Dodd-Frank and the Huawei Shock on DRC Tin Exports".

Following the reviewer's suggestion, the dataset integrates mirror trade data from the Democratic Republic of the Congo (DRC) and the Republic of the Congo (COG) to account for transit trade and potential misreporting. 
The estimation isolates the regulatory-driven market recovery by setting the end of the analysis period to October 2022, prior to subsequent global macroeconomic shocks.

2. SOFTWARE REQUIREMENTS
------------------------
- Stata (version 15.1 or later is recommended)
- The following user-written Stata packages are required to run the analysis:
  * ivreg2
  * xtivreg2
  * ranktest
  (You can install these in Stata by typing: `ssc install ivreg2`, `ssc install xtivreg2`, `ssc install ranktest`)

3. FOLDER STRUCTURE & FILE LIST
-------------------------------
Place all the following files in a single working directory:

[Code]
- Data_Integration.do : Cleans and merges raw data files to construct the monthly panel dataset.
- Analysis.do         : Replicates the structural estimations for Table 1, Table A1, and Table B1.

[Raw Data Files]
- drc_tin_imports_2009-2024_monthly.csv : DRC tin imports (Source: UN Comtrade)
- cog_tin_imports_2009-2024_monthly.csv : COG tin imports (Source: UN Comtrade)
- mmr_tin_imports_2009-2024_monthly.csv : Myanmar tin imports (Source: UN Comtrade)
- Country_Currency.csv                  : Country-to-currency mapping
- Exchange_Rates.csv                    : Monthly exchange rates data
- CMO-Historical-Data-Monthly.xlsx      : World Bank Pink Sheet for LME tin prices

[Generated Data]
- Data_Integrated.csv                   : The final merged panel dataset generated by Data_Integration.do and used by Analysis.do.

4. INSTRUCTIONS FOR REPLICATION
-------------------------------
Step 1: Save all raw data files and do-files in the same folder.
Step 2: Open Stata and set your working directory to that folder.
Step 3: Run `Data_Integration.do`. 
        -> This script will process the raw data and generate "Data_Integrated.csv".
Step 4: Run `Analysis.do`. 
        -> This script will read "Data_Integrated.csv" and output the estimation results.

5. OUTPUT MAPPING
-----------------
Running `Analysis.do` will reproduce the results presented in the paper:
- TABLE 1  : Estimation of Export Demand Elasticity over Distinct Periods (Periods 1 to 4).
- TABLE A1 : Estimation of Inverse Supply Elasticity (Omega) for the overall sample.
- TABLE B1 : Robustness Check Controlling for Myanmar Tin Imports (Periods 3 and 4).

================================================================================